import 'package:flutter/material.dart';

/// @date 2020/07/20  18:01
/// @author 程志强
/// @des  固定表头

class FixHeaderListView extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("固定表头"),
      ),
      body: Column(
        children: <Widget>[
          ListTile(
            title: Text("商品列表"),
          ),
          Expanded(
            child: ListView.separated(
                itemBuilder: _itemBuilder,
                separatorBuilder: (context, index) => Divider(),
                itemCount: 100),
          )
        ],
      ),
    );
  }

  Widget _itemBuilder(context, index) {
    return ListTile(
      title: Text("item $index"),
    );
  }
}
